﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WSMP.Administration.StudentManagement
{
    public partial class StudentList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                StudentGridView.DataSource = UserDataTable();
                StudentGridView.GrdView.DataBind();
                ViewState["data"] = StudentGridView.GrdView.DataSource;
            }
        }

        DataTable UserDataTable()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("UserId");
            dt.Columns.Add("UserName");
            dt.Columns.Add("UserType");
            dt.Columns.Add("ProfileCreated");
            dt.Columns.Add("Program");
            DataRow dr = dt.NewRow();
            dr["UserId"] = "1";
            dr["UserName"] = "Preshob";
            dr["UserType"] = "Student";
            dr["ProfileCreated"] = "False";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            dr["UserId"] = "2";
            dr["UserName"] = "Vishnnu";
            dr["UserType"] = "Student";
            dr["ProfileCreated"] = "False";
            dt.Rows.Add(dr);
            return dt;
        }
    }
}